import request from "@/utils/request"
import { HospitalDicData, HospitalResponseData, HosptialInfo } from "./type"

export const getHospitalAPI = (page: number, limit: number, hostype = '', districtCode = '') => {
    return request<any, HospitalResponseData>({
        url: `/hosp/hospital/${page}/${limit}?hostype=${hostype}&districtCode=${districtCode}`
    })
}

export const getHospitalLevelAndRegionAPI = (dictCode: string) => {
    return request<any, HospitalDicData>({
        url: `/cmn/dict/findByDictCode/${dictCode}`,
    })
}

export const getHospitalByHosnameAPI = (hosname: string) => {
    return request<any, HosptialInfo>({
        url: `/hosp/hospital/findByHosname/${hosname}`
    })
}